package com.dhh.web.modules.user.domain;

import lombok.*;

import javax.persistence.*;
import java.util.Set;

/**
 * @Auther: dhh
 * @Date: 2018/11/22 14:30
 * @Email: fzlinjianhui@163.com
 * @Description: 角色entity
 */
@Table(name = "dhh_web_role")
@Entity
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Role {

    @Id
    @Column(length = 32)
    private String roleId;

    @Column(unique = true,length = 20)
    private String name;

    @Column(unique = true,length = 20)
    private String roleCode;

    @ManyToMany(fetch=FetchType.EAGER)
    private Set<Perms> perms;
}
